﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'PRC_TB_USER_PROJECTS_SE')
	BEGIN
		DROP  Procedure  dbo.PRC_TB_USER_PROJECTS_SE
	END

GO

CREATE PROCEDURE [dbo].[PRC_TB_USER_PROJECTS_SE] 
(
    @TUPUSERID Integer 
)
AS
	SELECT a.TUP_USER_ID, a.TUP_PROJECT
	    FROM TB_USER_PROJECTS a
	    Where a.TUP_USER_ID = @TUPUSERID
	    ORDER BY a.TUP_PROJECT


GO

GRANT EXEC ON dbo.PRC_TB_USER_PROJECTS_SE TO PUBLIC

GO

